package com.thinkerwu.learn.core.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @author Thinker Wu
 * @date 2018年10月19日-10时02分
 */

@ApiModel("Select的Option")
public class EnumItemDto {

    @ApiModelProperty(value = "值属性值", example = "1")
    public int value;

    @ApiModelProperty("标签")
    public String label;

    @ApiModelProperty(value = "父属性值，0为顶层。分级Select的时候使用", example = "0", hidden = true)
    @JsonIgnore
    public int parentValue;

    @ApiModelProperty(value = "下级option")
    List<EnumItemDto> children;

    public EnumItemDto() {
    }

    public EnumItemDto(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public int getParentValue() {
        return parentValue;
    }

    public void setParentValue(int parentValue) {
        this.parentValue = parentValue;
    }

    public List<EnumItemDto> getChildren() {
        return children;
    }

    public void setChildren(List<EnumItemDto> children) {
        this.children = children;
    }
}
